package cn.linjianhui.article.dao;

import cn.linjianhui.article.dao.provider.ContextMapperProvider;
import cn.linjianhui.article.model.entity.ContextDO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.SelectProvider;
import org.springframework.stereotype.Repository;

@Repository
public interface ContextMapper extends BaseMapper<ContextDO> {

    @SelectProvider(type = ContextMapperProvider.class, method = "queryByKey")
    IPage<ContextDO> queryByKey(IPage<ContextDO> page, @Param("type")int type, @Param("keyWord")String key);
}
